<template>
  <el-pagination
    class="pager"
    background
    layout="prev, pager, next"
    :page-size="pagesize"
    @current-change="currentChange"
    :total="total">
  </el-pagination>
</template>

<script>
export default {
    name:'Pagination',
    props:{
        pagesize:{
            type:Number,
            default:()=>{
                return 15
            }
        },
        total:{
            type:Number,
            default:()=>{
                return 0
            }
        },
    },
    data(){
        return{}
    },
    methods:{
        currentChange(value){
            this.$emit('switch-page',value)
        }
    }
}
</script>

<style>
.pager{
    margin: 20px auto;
}
</style>